package c.j.a.d.b.j;

import android.text.TextUtils;
import c.j.a.d.b.e.s;

/* compiled from: RetryDelayTimeParamCalculator */
public class w implements s {
    public final long[] a;

    public w(String str) {
        long[] jArr = null;
        if (!TextUtils.isEmpty(str)) {
            try {
                String[] split = str.split(",");
                if (split.length != 0) {
                    long[] jArr2 = new long[split.length];
                    for (int i = 0; i < split.length; i++) {
                        jArr2[i] = Long.parseLong(split[i]);
                    }
                    jArr = jArr2;
                }
            } catch (Throwable th) {
                th.printStackTrace();
            }
        }
        this.a = jArr;
    }

    public long a(int i, int i2) {
        long[] jArr = this.a;
        if (jArr == null || jArr.length <= 0) {
            return 0;
        }
        i--;
        if (i < 0) {
            i = 0;
        }
        if (i > jArr.length - 1) {
            i = jArr.length - 1;
        }
        return jArr[i];
    }
}
